package com.tj.bo.account.client.enums;

public enum DepositStatusEnum {
    //
    INIT(0,"init"),
    PROCESSING(1,"processing"),
    SUCCESS(2,"success"),
    FAILED(-1,"failed");
    private int code;
    private String desc;

    DepositStatusEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static DepositStatusEnum getDepositStatusByCode(int code) {
        DepositStatusEnum[] values = DepositStatusEnum.values();
        for (DepositStatusEnum value : values) {
            if (value.code == code) {
                return value;
            }
        }
        return null;
    }
}